#include<stdio.h>

int func(int x);

int main()
{
    printf("%d\n",func(5));
    return 0;
}
int func(int x){
    int countx = 0;
    while(x)
    {
        countx++;
        x=x&(x-1);
    }
    return countx;
}